<?
include('adodb/adodb-exceptions.inc.php'); 
require ("comun/ini.php");
	$JsonEnv = new Services_JSON();
	$JsonRec = new Services_JSON();
	$JsonRec=$JsonRec->decode(str_replace("\\","",$_POST['JsonEnv']));

	try {
		$q = "SELECT B.completa FROM facturas AS A INNER JOIN experticias AS B ON A.id_experticia = B.id WHERE A.id= $JsonRec->ID";
		//die($q);
		$r = $conn->Execute($q);
		$i=0;
		while(!$r->EOF){
			$EstatusExp[$i]['E'] = $r->fields['completa'];
			$i++;
			$r->movenext();
		}
		if(is_array($EstatusExp)){
			echo $JsonEnv->encode($EstatusExp);
		}else{
			echo false;
		}
	}catch( ADODB_Exception $e ){
		//	echo ERROR_CATCH_GENERICO;
		echo false;
	}

?>